﻿package mortal.game.scene3D.fight
{
    import __AS3__.vec.*;
    import com.gengine.global.*;
    import flash.utils.*;
    import mortal.game.cache.*;

    public class FightEffectChecker extends Object
    {
        public static const secMaxNum:int = 6;
        public static var vcTime:Vector.<int> = new Vector.<int>;

        public function FightEffectChecker()
        {
            return;
        }// end function

        public static function check(param1:Boolean, param2:Boolean = false) : Boolean
        {
            if (Global.isMinimize)
            {
                return false;
            }
            if (param1)
            {
                return true;
            }
            if (Cache.instance.role.entityInfo.level < 40 && param2)
            {
                return false;
            }
            var _loc_3:* = getTimer();
            if (vcTime.length < secMaxNum)
            {
                vcTime.push(_loc_3);
                return true;
            }
            var _loc_4:* = vcTime[0];
            if (_loc_3 - _loc_4 > 1000)
            {
                vcTime.shift();
                vcTime.push(_loc_3);
                return true;
            }
            return false;
        }// end function

    }
}
